﻿@using MvcApplication1.Controllers
@model TreeChildrenArg
<ul class="Container_te014">
    @{var items = Model.Items.ToList();}
    @for (var index = 0; index < items.Count; index++)
    {
        var isLast = index == items.Count - 1 ? "IsLast_te007" : "";
        var expandClass = items[index].IsLeaf ? "ExpandLeaf_te003" : "ExpandClosed_te005";
        <li class="Node_te013 @isLast @expandClass" data-id_te008="@items[index].GetId()">
            <div class="Expand_te001"></div>
            <div class="Content_te012">@items[index].Title</div>
        </li>
    }
</ul>